package com.yc.edu.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yc.edu.pojo.DigitalPeople;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface DigitalPeopleDAO extends BaseMapper<DigitalPeople> {
    @Select("select * from psychological.digitalpeople ")
    List<DigitalPeople> getDigitalPeopleList();

    @Select("select *from psychological.digitalpeople where name=#{dialogUser}")
    DigitalPeople getDigitalPeopleParm(String dialogUser);
    @Insert("insert into psychological.digitalpeople (id,name,description,img,url) values(null,#{name},#{description},#{img},#{url})")
    void InsertDigitalPeopleImg(String img,String url,String name,String description);
    @Update("update psychological.digitalpeople set refer_wav_path=#{refer_wav_path} where name=#{name}")
    void InsertDigitalPeopleWav(String refer_wav_path,String name);
}
